package com.zhisheng.springbootredis.controller;

import com.zhisheng.springbootredis.entity.Product;
import com.zhisheng.springbootredis.service.ProductService;
import com.zhisheng.springbootredis.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;

/**
 * (Product)表控制层
 *
 * @author 杨小龙
 * @since 2025-10-20 16:58:26
 */
@RestController
@RequestMapping("product")
public class ProductController {
    /**
     * 服务对象
     */
    @Autowired
    private ProductService productService;

    @GetMapping("byid/{id}")
    public R selectById(@PathVariable("id")Long id){
        R<Product> productR = productService.selectById(id);
        return productR;
    }



}

